package com.assjirc.irc;

public class Channel {
	private String name;

	private StringBuffer text;

	private String topic;

	public Channel(String name) {
		this.name = name == null ? "" : name;
		text = new StringBuffer();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return this.name;
	}

	public String getText() {
		return text.toString();
	}

	public void setText(String text) {
		this.text.delete(0, this.text.length());
		this.text.append(text);
	}

	public void appendText(String text) {
		this.text.append(text);
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}
}
